package service.applycheck;

import java.util.List;

import model.creditcheck.Applystate;

import exception.Exceptions;

public interface ApplyStateService {
	
	/*判断一个申请号在该applystate表中是否有记录*/
	public boolean isHaveRecord(Integer applyid) throws Exceptions;
	
	/*得到所有applyid的记录*/
	public List<?> getAllListByApplyid(Integer applyid) throws Exceptions;
	
	/*删除所有applyid的记录*/
	public void delAllRecordByApplyid(Integer applyid) throws Exceptions;
	/*删除所有applyid的记录by applyid and type*/
	public void delAllRecordByApplyidAndType(Integer applyid, String checktype, Integer type) throws Exceptions;
	
	public Applystate save(Applystate applystate) throws Exception;
	
	public void saveAllByRole(Integer applyid, Integer roleid, String checkType) throws Exception;
	
	public void saveAllByManagerId(Integer applyid, Integer managerid, String checkType, Integer applytype, int count) throws Exception;
	
	public List<?> findApplyStateByApplyId(Integer applyid);
	
	public Applystate getOneApplyStateByIdAndType(Integer id, String type);
	
	public int isHaveFP(Integer applyid);
	
	public int checkApplyState(Integer applyid);
	
	/*回退状态的检查*/
	public int getBackStateCheck(Integer applyid);
	
	/*检查是否所有的调查人员已经更新*/
	public boolean isAllSurveyDo(Integer applyid, String type);
	
	public void resetSurveyAccord(Integer applyid);
	
}
